<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form action = "http://1.92.72.134:8080/login" method="post">
        <input type="text" id="username" name="username">
        <input type="password" id="password" name="password">
        <input type="submit" id="submit" name="提交"> 
    </form>
    <button onclick="test()">普通处理的按钮</button>
    
</body>
    <script src="https://cdn.staticfile.net/jquery/1.10.2/jquery.min.js">
    </script>
    <script>
        function test()
        {
            // alert("你好");
            var login_info={
                username:document.getElementById("username").value,
                password:document.getElementById("password").value
            }
            $.ajax({
                type:"post",
                url :"http://1.92.72.134:8080/login",
                data:JSON.stringify(login_info),
                success:function(res,statu,xhr){
                    alert(res);
                },
                error:function(xhr){
                    alert(JSON.stringify(xhr));
                }
            });
        }
    </script>
</html>